package com.bosintek.wordtest.util;

import java.util.Vector;

import android.app.Activity;
import android.widget.Toast;

import com.bosintek.wordtest.Bank;

public class ObjectsManager {

	private static Vector<Bank> banks;
	private static Bank marked;
	private static Bank currentBank;
	private static String user;
	private static String pass;
	private static Activity activity;
	private static boolean mustReload;
	
	public static Activity getActivity() {
		return activity;
	}

	public static void setActivity(Activity activity) {
		ObjectsManager.activity = activity;
	}

	public static Vector<Bank> getBanks(){
		return banks;
	}
	
	public static void setBanks(Vector <Bank> banks){
		ObjectsManager.banks = banks;
	}

	public static String getUser() {
		return user;
	}

	public static void setUser(String user) {
		ObjectsManager.user = user;
	}

	public static String getPass() {
		return pass;
	}

	public static void setPass(String pass) {
		ObjectsManager.pass = pass;
	}

	public static Bank getCurrentBank() {
		if(currentBank!=null){
			return currentBank;			
		}else if(banks.size()>0){
			currentBank=banks.get(0);
		}
		
		return currentBank;
	}

	public static void setCurrentBank(Bank currentBank) {
		ObjectsManager.currentBank = currentBank;
	}

	public static Bank getMarked() {
		return marked;
	}

	public static void setMarked(Bank marked) {
		ObjectsManager.marked = marked;
	}

	public static boolean isMustReload() {
		return mustReload;
	}

	public static void setMustReload(boolean mustReload) {
		ObjectsManager.mustReload = mustReload;
	}
	
}
